home *** CD-ROM | disk | FTP | other *** search
/ Sunrise Express Series 285 / Sunrise Express Series 285.iso / pc / JR.Dxr / 00034_Go to Marker with Transition.ls < prev    next >
Encoding:
Text File  |  1998-05-11  |  2.0 KB  |  60 lines

  1. property whichevent, WhichLabel, playMode, thetransition
  2.  
  3. on initGotoMarker me
  4.   init(me)
  5. end
  6.  
  7. on mouseUp me
  8.   if whichevent = #mouseUp then
  9.     init(me)
  10.   end if
  11. end
  12.  
  13. on prepareFrame me
  14.   if whichevent = #prepareFrame then
  15.     init(me)
  16.   end if
  17. end
  18.  
  19. on exitFrame me
  20.   if whichevent = #exitFrame then
  21.     init(me)
  22.   end if
  23. end
  24.  
  25. on init me
  26.   puppetTransition(thetransition)
  27.   if the playMode of me = "Go to" then
  28.     case WhichLabel of
  29.       #previous:
  30.         go(marker(-1))
  31.       #loop:
  32.         go(marker(0))
  33.       #next:
  34.         go(marker(1))
  35.       otherwise:
  36.         go(WhichLabel)
  37.     end case
  38.   else
  39.     case WhichLabel of
  40.       #previous:
  41.         play frame marker(-1)
  42.       #loop:
  43.         play frame marker(0)
  44.       #next:
  45.         play frame marker(1)
  46.       otherwise:
  47.         play frame WhichLabel
  48.     end case
  49.   end if
  50. end
  51.  
  52. on getPropertyDescriptionList
  53.   set p_list to [#WhichLabel: [#comment: "Destination Marker:", #format: #marker, #default: "#Loop"], #whichevent: [#comment: "Initializing Event:", #format: #symbol, #range: [#mouseUp, #prepareFrame, #exitFrame, #initGotoMarker], #default: #mouseUp], #playMode: [#comment: "Play Mode:", #format: #symbol, #range: ["Go to", "Play and Return"], #default: "Go to"], #thetransition: [#comment: "Transition:", #format: #transition, #default: 51]]
  54.   return p_list
  55. end
  56.  
  57. on getBehaviorDescription
  58.   return "Moves the Playback Head to a designated marker when the specified event occurs.  Drag to a sprite or a frame in the script channel." && RETURN & "PARAMETERS:" && RETURN & "窶「 Destination Marker - Choose from a list of all marker names in the current movie or choose Previous, Loop (Current), or Next." && RETURN & "窶「 Initializing Event - Specify the event that triggers the behavior." & RETURN & "窶「 Play Mode - Choose Play and Return to make the Playback Head return to the current location when the Play Done behavior is encountered. Choose Go To to make the Playback Head continue from the specified frame until explicitly sent to a new location."
  59. end
  60.